<!--  -->
<template>
  <swiper>
    <swiper-item v-for="item in swiperList" :key="item.index">
      <a :href="item.link">
        <img :src="item.image" alt="" @load="imgLoad" />
      </a>
    </swiper-item>
  </swiper>
</template>

<script>
import { Swiper, SwiperItem } from "../../common/swiper";

export default {
  props: {
    swiperList: {
      type: Array,
      default: "",
    },
  },
  components: {
    Swiper,
    SwiperItem,
  },
  data() {
    return {
      isload: false,
    };
  },
  computed: {},
  watch: {},
  methods: {
    imgLoad() {
      if (!this.isload) {
        this.$emit("imgLoads");
        this.isload = true;
      }
    },
  },
  created() {},
  mounted() {},
  updated() {},
};
</script>
<style lang="less" scoped></style>
